
binarystr = max([len(x) for x in bin(int(input()))[2:].split('0')])

print(binarystr)
